package com.spark.teaching.sparkfeign.controller;

import com.spark.teaching.sparkfeign.service.ScheduleServiceHi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 调用eurekaclient的服务，对外暴露接口
 * @author zhaoyiwu
 * @create 2017-09-30 11:11
 **/
@RestController
public class HiController {

    @Autowired
    ScheduleServiceHi scheduleServiceHi;

    @RequestMapping(value="/hi",method= RequestMethod.GET)
    public String sayHi(@RequestParam String name){

        return scheduleServiceHi.sayHiFromClientOne(name);
    }
}
